package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.PePermissionGroup;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface PermissionGroupMapper extends BaseMapper<PePermissionGroup> {
    @Insert("insert into a_permission_permission_group values (#{pgid},#{pid})")
    void addPG(@Param("pid") Integer pid,@Param("pgid") Long id);

    @Delete("delete from a_permission_permission_group where pgid=#{id}")
    void delPG(Integer id);

    @Select("select pid from a_permission_permission_group where pgid=#{id}")
    Integer[] selPG(Integer id);
}
